def f(x):
    return 2.71828**(-x*x)

a=float(input())
b=float(input())
k=float(input())
ans=0
eps=10**(-10)
while a+eps<b:
    ans+=f(a)*k
    a+=k
print("%.5f" % ans)